<html>
<head>
    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
    <title>{:getWebset('title')}</title>
    <!--描述和摘要-->
    <meta name="Description" content="{:getWebset('describe')}"/>
    <meta name="Keywords" content="{:getWebset('keywords')}"/>
    <!--载入公共模板-->
    <meta name="viewport"
          content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no"/>
    <link rel="stylesheet" type="text/css" href="/static/home/org/bootstrap-3.3.5-dist/css/bootstrap.min.css"/>
    <script src="/static/home/js/jquery-1.11.3.min.js" type="text/javascript" charset="utf-8"></script>
    <script src="/static/home/org/bootstrap-3.3.5-dist/js/bootstrap.min.js" type="text/javascript"
            charset="utf-8"></script>
    <link rel="stylesheet" type="text/css" href="/static/home/css/index.css"/>
    <link rel="stylesheet" type="text/css" href="/static/home/css/backTop.css"/>
</head>
<body>
<header>
    <div class="container">
        <div class="row">
            <div class="col-sm-12">
                <h1>欢迎来到{:getWebset('title')}系统</h1>
            </div>
        </div>
    </div>
</header>
<nav role="navigation" class="navbar navbar-default">
    <div class="container">
        <div class="row">
            <div class="col-sm-12">

                <div class="navbar-header">

                    <button type="button" class="navbar-toggle" data-toggle="collapse"
                            data-target="#example-navbar-collapse">
                        <span class="sr-only">切换导航</span>
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                    </button>
                </div>

                <div class="collapse navbar-collapse" id="example-navbar-collapse">
                    <ul class="_menu">
                        <li
                            <?php if (strtolower(request()->controller()) . '/' . strtolower(request()->action()) == 'index/index') {
                                echo 'class = "_active"';
                            } ?>
                        ><a href="/">首页</a></li>
                        {volist name="categorys" id="category"}
                        <li
                            <?php if ($category['cid'] == getCurrenCid()) {
                                echo 'class = "_active"';
                            } ?>
                        ><a href="{:url('catelist',['cid'=>$category['cid']])}">{$category.cname}</a></li>
                        {/volist}
                    </ul>
                </div>
            </div>
        </div>
    </div>
</nav>

<section>
    <div class="container">
        <div class="row">
            <!--标签规定文档的主要内容main-->
            <main class="col-md-8">
                {block name="content"}内容{/block}
            </main>
            <aside class="col-md-4 hidden-sm hidden-xs">
                <div class="_widget">
                    <h4>关于自己</h4>
                    <div class="_info">
                        <p>
                            老和尚问小和尚：“如果你前进一步是死，后退一步则亡，你该怎么办？”小和尚毫不犹豫地说：“我往旁边去。”天无绝人之路，人生路上遭遇进退两难的境况时，换个角度思考，也许就会明白：路的旁边还是路。</p>
                        <p>
                            <i class="glyphicon glyphicon-volume-down"></i>
                            生命在于折腾
                            <a href="/" target="_blank">{:getWebset('title')}</a>
                        </p>
                    </div>
                </div>
                <div class="_widget">
                    <h4>分类列表</h4>
                    <div>
                        {volist name="categorys" id="category"}
                        <a href="{:url('catelist',['cid'=>$category['cid']])}">{$category.cname}({$category->article()->where('softdelete',0)->count()})</a>
                        {/volist}
                    </div>
                </div>
                <div class="_widget">
                    <h4>标签云</h4>
                    <div class="_tag">
                        {volist name="tags" id="tag"}
                        <a href="{:url('taglist',['tid'=>$tag['tid']])}">{$tag.tname}</a>
                        {/volist}
                    </div>
                </div>
            </aside>
        </div>
    </div>
</section>


<footer class="hidden-xs">
    <div class="container">
        <div class="row">
            <div class="col-sm-4">
                <h4 class="_title">最新文章</h4>
                {volist name="newArticles" id="newArticle"}
                <div id="" class="_single">
                    <p><a href="{:url('content',['id'=>$newArticle['aid']])}">{$newArticle.title}</a></p>
                    <time>{:date('Y年m月d日H:i:s',$newArticle['time'])}</time>
                </div>
                {/volist}
            </div>
            <div class="col-sm-4 footer_tag">
                <div id="">
                    <h4 class="_title">标签云</h4>
                    {volist name="tags" id="tag"}
                    <a href="{:url('taglist',['tid'=>$tag['tid']])}">{$tag.tname}</a>
                    {/volist}
                </div>
            </div>
            <div class="col-sm-4">
                <h4 class="_title">友情链接</h4>
                <div id="" class="_single">
                    {volist name="links" id="link"}
                    <p><a href="{$link.weblink}" target="_blank">{$link.webname}</a></p>
                    {/volist}

                </div>
            </div>
        </div>
    </div>
</footer>
<div class="footer_bottom">
    <div class="container">
        <div class="row">
            <div class="col-sm-12">
                <a href="">{:getWebset('title')}</a>
                |
                <a href="">{:getWebset('copyright')}</a>
                |
                <a href="">{:getWebset('email')}</a>
            </div>
        </div>
    </div>
</div>
<!--返回顶部自己写的插件-->
<!--<script src="/static/home/js/backTop.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript">
    $(function () {
        //插件使用
        $('.back_top').backTop({right: 30});
    })
</script>
<div class="back_top hidden-xs hidden-md">
    <i class="glyphicon glyphicon-menu-up"></i>
</div>-->
</body>
</html>

